import java.io.BufferedReader;
import java.net.Socket;
import java.net.UnknownHostException;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintStream;
import java.util.Scanner;

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 *
 * @author elliot
 */
public class HandTest
{
    public static void main(String []args)
    {
        try
        {
            Socket s = new Socket("168.26.200.193", 6543);
//            Socket s = new Socket("localhost", 6543);
            BufferedReader br = new BufferedReader( new InputStreamReader(s.getInputStream()));
            PrintStream osw = new PrintStream(s.getOutputStream());
            boolean done = false;
            Scanner scan = new Scanner(System.in);
            while(!done)
            {
                String temp = scan.nextLine();
                if(temp.startsWith("q"))
                {
                    done = true;
                }
                else
                {
                    osw.println("*U1{?}");
                    System.out.println("One " + br.readLine());
                    br.readLine();
                    osw.println("*U2{?}");
                    System.out.println("Two " + br.readLine());
                    br.readLine();
                }
            }
            br.close();
            osw.close();
            s.close();
        }
        catch(UnknownHostException ex)
        {
            System.out.println(ex.getMessage());
        }
        catch(IOException ex)
        {
            System.out.println(ex.getMessage());
        }
    }

}